<?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ～ ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2021 http://catchadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( https://github.com/yanwenwu/catch-admin/blob/master/LICENSE.txt )
// +----------------------------------------------------------------------
// | Author: JaguarJack [ njphper@gmail.com ]
// +----------------------------------------------------------------------

// wechatopen路由
$router->group(function () use ($router){
    $router->get('mpopen', '\app\uctoo\wechatopen\controller\Wechatopen@index')->allowCrossDomain();
    // authEvent路由
    $router->post('wechatopen/authevent', '\app\uctoo\wechatopen\controller\Wechatopen@authEvent');
    // EventMessage路由
    $router->post('wechatopen/eventmessage/appid/<appid>', '\app\uctoo\wechatopen\controller\Wechatopen@EventMessage');
    //获取扫码授权URL接口
    $router->get('component/authorize', '\app\uctoo\wechatopen\controller\Component@authorize');
    //扫码授权后处理数据
    $router->post('component/getauthorization/[:auth_code]', '\app\uctoo\wechatopen\controller\Component@getAuthorization')->allowCrossDomain();
});